{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 精准率-召回率的关系曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "from sklearn import datasets"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "D:\\ProgramData\\Anaconda3\\lib\\site-packages\\sklearn\\linear_model\\logistic.py:432: FutureWarning: Default solver will be changed to 'lbfgs' in 0.22. Specify a solver to silence this warning.\n",
      "  FutureWarning)\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "0.9755555555555555"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "digits = datasets.load_digits() # 加载手写数字识别数据集\n",
    "X = digits.data\n",
    "y = digits.target.copy()\n",
    "# 多分类问题转换为二分类问题，即等于9和不等于9,数据比例大约是1:9,也就是说我们只要全认为是非9，按照传统计算正确率的方法我们也有90%的正确率\n",
    "y[digits.target==9] = 1\n",
    "y[digits.target!=9] = 0\n",
    "from sklearn.model_selection import train_test_split\n",
    "X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=666)\n",
    "from sklearn.linear_model import LogisticRegression\n",
    "log_reg = LogisticRegression()\n",
    "log_reg.fit(X_train, y_train)\n",
    "log_reg.score(X_test, y_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "decision_scores = log_reg.decision_function(X_test)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 所有的边界阈值\n",
    "thresholds = np.arange(decision_scores.min(), decision_scores.max())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import precision_score\n",
    "from sklearn.metrics import recall_score\n",
    "precisions = []\n",
    "recalls = []"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 循环所有的边界阈值\n",
    "for threshold in thresholds:\n",
    "    y_predict = np.array(decision_scores >= threshold, dtype='int')\n",
    "    precisions.append(precision_score(y_test, y_predict))\n",
    "    recalls.append(recall_score(y_test, y_predict))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deXxV9Z3/8dcnNxskIQGSsARCkB0RZXHXqmhbF5TO2E7RttqOU6eLHR27jN2cGdvHrx2d1m7WDrYd246tpdOORcVate6KLAKyCQQQCAGyEbJv935/f5wbGkIkl+Qm596T9/PxuI977znnnvs5vfXNN9/zPd9jzjlERCT5pfhdgIiIxIcCXUQkIBToIiIBoUAXEQkIBbqISECk+vXF+fn5rqSkxK+vFxFJSuvWratyzhX0tM63QC8pKWHt2rV+fb2ISFIys73vtk5dLiIiAaFAFxEJCAW6iEhAKNBFRAJCgS4iEhC9BrqZ/dzMKsxs87usNzP7gZmVmtlbZjY//mWKiEhvYmmhPwxceZL1VwHToo9bgQf7X5aIiJyqXsehO+deMrOSk2yyBPil8+bhXWVmeWY2zjl3ME41Hm/v67DrLwOya5GklV0ICz4BId8uLUk4r5VWsWp3td9l9OjyWWM4c2Je3Pcbj1+/CNjf5X1ZdNkJgW5mt+K14ikuLu7bt5Wthpfu69tnRQIpek+D9ma48J/8LSVBhCOOO367gYr6Vsz8ruZEhSMyEzbQe/qfq8e7ZjjnlgHLABYuXNi3O2tce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5u/h7vrw8I3nEG7Xh6FJ1efB7wBjDGOXcQvNAHCvuz78DdJNrMngXG9rDqq8DlwD87535vZn+Hd0HUFcQ4F00i6eU4U4GReN0NZwPLzew0gnecX8HrjjjhYz0sS9rjdM79MbrNV4EO4JHOj/WwfUIfZy+CdjwnMLNs4PfAHc65unhPShu4QHfOXfFu68zsl8Dt0be/A34afR3LfDUJpZfj/DTwB+d1zK02swjeJECBOU4zOwOv33hj9D+KCcCb0RPdgTnOTmZ2M7AYuDz6u0ISHmcvgnY8xzGzNLwwf8Q594fo4sNmNs45dzDaLVjx7nvo3VDrcikHLom+XgTsjL5eAdwUHR1xHnC088+gJPUY3vFhZtPxTjBV4R3n0ugdpiYD04DVvlXZD865Tc65QudciXOuBC8M5jvnDhGw39PMrgT+BbjOOdfUZVVgfs+oWOaNSkrR+0P8DNjmnPtul1Vd58G6Gfhjf74ncC30XnwS+H50RsgW4Nbo8pV4IyNKgSbgE/6UFzc/B35uZpuBNuDmaKtui5ktB7bi/en+Wedc2Mc6B0rQfs8f4Y1keSb618gq59ynnDenUmB+T/cu80b5XFa8XAh8DNhkZhuiy74CfBuvS/QWYB/9nEJFl/6LiATEUOtyEREJLAW6iEhAKNBFRAJCgS4iEhAKdBGRgFCgi4gEhAJdRCQg/j+N3/GrmD8J2QAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(thresholds, precisions)\n",
    "plt.plot(thresholds, recalls)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 精准率召回率曲线\n",
    "> X轴是精准率Precision，y轴是召回率Recall"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICA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f3ShK2BdmtgSY6+4/HMvCQhLkz8ZCYKGZvW5mm81sxZhVN/aC9MdfAHeYWS2xW6G/NDalpaUzzZaE9JLoxAKtUwNgZncAFcA1Ka0oPMP2hZllEVs++fNjVVDIgvzZyCE27XItsf9ze83MFrl7S4prC0OQ/lgNPOPuf2tmHyP2QOIid+9LfXlpJ3C2BKURemJB1rLBzG4A/hxY6e5dY1TbWEvUFwXAIuBVMztAbF5wXYQvjAZd5+gH7n7S3fcDe4kFfBQF6Y+7gRcA3P0NIJ/YQlVno0DZciYU6IklXMsmPs3wBLEwj/Ic6bB94e6t7l7k7vPcfR6x6wkr3b0qnHJTLsg6R/9B7KI5ZlZEbApm35hWOXaC9MdB4HoAM7uQWKCfrWtprwPujN/tsgxodfdDozmgplwS8GBr2TwKTAJejL/X46C7rwyt6BQJ2BdnjYD9sRH4hJntBnqBB929KbyqUydgf3wZeNLM/ojY9MLnPX7LR9SY2XPEptqK4tcMvgLkArj748SuIdwMVAMdwF2jPmdE+1JE5KyjKRcRkYhQoIuIRIQCXUQkIhToIiIRoUAXEYkIBbqISEQo0EVEIuK/AZGJfomgwYJ2AAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(precisions, recalls)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## sklearn中的精准率-召回率曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sklearn.metrics import precision_recall_curve"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "precisions, recalls, thresholds = precision_recall_curve(y_test, decision_scores)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(145,)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "precisions.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(145,)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "recalls.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(144,)"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "thresholds.shape"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 绘制精准率和召回率随着边界阈值的曲线\n",
    "> 可以从下面的曲线选出合适的threshold"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAgAElEQVR4nO3deXhU5f3+8fcn6yRkgZAFzMIaBERkGRYrKiIiohaqWHFfUESrba1dbF1at2+r1vandUUFRW2tWiuoFBBcQGULyJZgIOwhkIUtG9mf3x8naAwDmYSZnFk+r+uaazIzJzM343jzcOac5xFjDEoppfxfiN0BlFJKeYYWulJKBQgtdKWUChBa6EopFSC00JVSKkCE2fXCiYmJpnv37na9vFJK+aXVq1eXGGOSXD1mW6F3796drKwsu15eKaX8kojsPN5justFKaUChBa6UkoFCC10pZQKEFroSikVILTQlVIqQLRY6CIyU0SKRGTjcR4XEXlGRPJEZL2IDPF8TKWUUi1xZ4T+GjD+BI9fBGQ2XqYBL5x8LKWUUq3V4nH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pmInGN3ID/nk59HEYkB/gP80hhT6o3XcGu2RX9ijBnbht+pBqobf14tIluBPoBXvqBqS0bcW2jEa9zNLCIvAx95OY67bH3P3GWMKWi8LhKR/2LtKnL1PY8vKBSRrsaYvSLSFSiyO1BzxpjCoz/7yudRRMKxyvwtY8z7jXd7/L0MuBF6W4hI0tEvGEWkJ5AJbLM31THmAlNEJFJEemBlXGlzJgAaP4xH/QTri11f4M7iLLYSkQ4iEnv0Z2AcvvP+udJ0MZsbgDk2ZnHJ1z6PIiJYa0ZsMsb8rclDnn8vjTFBc8H6j5uPNRovBBY03n85kA2sA9YAl/paxsbH7gO2ArnARXa/n01yvQFsANY3fki72p2pSbYJwObG9+0+u/O4yNez8XO3rvEz6DMZgX9h7bKobfxMTsVa/H0xsKXxOsEHM/rU5xEYhbWrbz2wtvEywRvvpZ76r5RSAUJ3uSilVIDQQldKqQChha6UUgFCC10ppQKEFrpSSgUILXSllAoQWuhKKRUg/j9Y0QuNEVWWGQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(thresholds, precisions[:-1]) # [:-1]是为了让数据的长度都是144\n",
    "plt.plot(thresholds, recalls[:-1])\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 绘制精准率-召回率的曲线"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXQAAAD4CAYAAAD8Zh1EAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjAsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+17YcXAAAV6klEQVR4nO3dfZBV9Z3n8feX5kFAHhQQkAd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iZXpSRz7pLLhVCTvIuAHlenHBlk+rDLzCU785LZrgW9ln9XA5IiYeSrv2WyFXuSB1ETEpyPiVfpK8g+GKdtgquaNiEuBOZn50HAGO45C2xf4aOVPwAciYs4gy4dDkawLgYUR8aOIWB0RS4Yt3bGKblsi4jxgPvDoMOQ6niJ5vwj8dkR00Pc8hM8MT7RBFcn7HPDRyvRvABMi4piH1TeRwp+Zopqt0Is+bHp5Zl4A/DHwhbqnOr4T5o2IEcCdwOeHLdGJFdm+3wXmZea7gO8D99Q91eCKZB1J32GXK+nb470rIibXOdfxFPrsVtwAPJCZR+qYp5oieZcB38zM2fQdHri38pluhCJ5/wj4YET8DPgg8AZwuN7BTsFQPjOFNFuhF3kgdX/3Ab9e10QnVi3vBOBi4PGIeI2+42QrG3hitOr2zcwdmXmgMvs/gfo9ovzEij6c/MHMPJSZm4D19BV8Iwzls3sDjT3cAsXy3gTcD5CZTwFn0HdTqUYo8tndkpm/mZmXArdVXts9fBGHbKh9V10jTxoMcpJgJLCRvj9Hj574eOeAMQv6TX+EvueaNm3eAeMfp7EnRYts35n9pn8DWN3EWZcA91Smp9L35+uUZs1bGXch8BqVL/U1+WfhYeDGyvRF9JVNQ3IXzDsVGFGZ/i/AHY3cxpUc8zj+SdFf45dPiv70lN+v0b/wIL/kNcDL9J3Rvq3y2h3A0sr0XwBrgWfpO/Fx3AJthrwDxja00Atu3z+rbN/nKtv3V5o4awBfA14CXgBuaOZtW5n/IvClRuYcwvZdBPyo8ll4FvjnTZ73OuCVypi7gDENzvsd4E3gEH174zcBnwQ+WVkewPLK7/NCLbrBr/5LUkk02zF0SdJJstAlqSQsdEkqCQtdkkrCQpekkrDQJakkLHRJKon/D28ghQr9zTdfAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(precisions, recalls)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
